<?php 
class indexAction extends sfAction{
	public function execute($request){
		$data['pagination']	= array(
				'page'		=> intval($request->getParameter('page', 1)),
				'limit'		=> sfConfig::get('app_faq_index_limit', 6),
				'total'		=> 0,
				'router'	=> 'faq',
				'params'	=> array()
		);
		$data['faqs']	= Faqs::getDataListFrontEnd(array(),$data['pagination']);
		$data['pagination']['total'] = Faqs::getDataListCountFrontEnd();
		$data['news']				= News::getDataListFrontEnd(array('filter_sort_order' => News::FILTER_SORT_ATTRIBUTE_HOT), array('page' => 1, 'limit' => sfConfig::get('app_faq_news_limit')));
		$this->setVar('data', $data);
	}
}